var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            var e = cm.getPlayer().getPosition();
            if (Math.abs(e.x - 3662) > 200 || Math.abs(e.y - 68) > 200) {
                cm.playerMessage(5, "离得太远了，没法说话。");
                cm.playerMessage(-1, "离得太远了，没法说话。");
                cm.dispose()
            } else {
                cm.sendNormalTalk("噢，你们已经表现出了平静心了，那么我就送给你们证物吧。来，这是修炼证物，拿去吧。", 33, 2440018, false, true)
            }
        } else {
            if (status === a++) {
                cm.gainItem(4033833, 1);
                cm.dispose();
                cm.warp(324000000, 8, false)
            }
        }
    }
};